﻿<UserControl x:Class="ViewParametrageAvance"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:OMANE.Modules.PMT"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="600">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>

            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <GroupBox Grid.Row="1" Header="Parametrage Avancé" Grid.ColumnSpan="3">
            <StackPanel>
                <StackPanel Orientation="Horizontal"  >
                    <TextBlock Text="Parametre de projection" VerticalAlignment="Center" Margin="0,0,10,0"  />
                    <ComboBox MinWidth="200" Margin="0,0,10,0"  IsSynchronizedWithCurrentItem="True" SelectedItem="{Binding Path=Parametre, Mode=TwoWay}"  ItemsSource="{Binding ListeParametre}">
                        
                    </ComboBox>
                    <!--<Button Background="White" Content="Supprimer le perimetre selectionné" Margin="0,0,10,0" Padding="2"/>-->
                    <TextBox MinWidth="200" Name="txtValue" />
                    <Button x:Name="BtCreerCrtGroupePmt" Background="White" Content="Creer un parametre" Margin="0,0,10,0" Padding="2"  />
                    <!--<Button x:Name="BtModifierPerimetre" Background="White" Content="Modifier le perimetre selectionné" Margin="0,0,10,0" Padding="2"  />-->

                </StackPanel>
                <!--<Grid Margin="5" Visibility="Collapsed" Name="GridPerimetre">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />

                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />

                    </Grid.ColumnDefinitions>

                    <TextBlock VerticalAlignment="Center" Margin="2"  Text="Nom du Chargé de portefeuille" />
                    <TextBox Text="{Binding Path=Perimetres/Charge_de_Portefeuille}" MinWidth="200" Grid.Column="1" VerticalAlignment="Center" Margin="2" />
                    <TextBlock Grid.Row="1" Text="Nom du validateur" VerticalAlignment="Center" Margin="2" />
                    <TextBox MinWidth="200" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Margin="2" />

                    <StackPanel Grid.Row="2" Grid.ColumnSpan="4">
                        <TextBlock Text="Description" VerticalAlignment="Center" Margin="2" />
                        <RichTextBox MinHeight="100" Margin="5" />
                    </StackPanel>

                    <StackPanel Grid.Column="2" VerticalAlignment="Center" Grid.RowSpan="2">
                        <Button Content="Valider" Padding="2" Margin="2" />
                        <Button Content="Annuler" Padding="2" Margin="2"/>
                    </StackPanel>

                </Grid>-->
            </StackPanel>
        </GroupBox>
        
        <GroupBox Grid.Row="2" Header="Groupes"  Margin="5">
            <local:AdvancedDatagrid  x:Name="ClesDGrid" Margin="5" ItemsSource="{Binding ReferenceProjection}" IsReadOnly="True" ColumnWidth="*"/>
        </GroupBox>
        <GroupBox Grid.Row="2" Grid.Column="2" Header="Groupes du perimetre" Margin="5">
            <local:AdvancedDatagrid x:Name="ClesParamDGrid" Margin="5" ItemsSource="{Binding ParametrageAvance}" IsReadOnly="True" ColumnWidth="*">
                <local:AdvancedDatagrid.DefaultFilter>
                    <Binding Path="Parametre">
                        <Binding.Converter>
                            <local:VariableValueToFilterConverter ColumnName="Parametre" />
                        </Binding.Converter>
                    </Binding>
                </local:AdvancedDatagrid.DefaultFilter>
            </local:AdvancedDatagrid>
        </GroupBox>
        <GridSplitter Grid.Column="1" Grid.Row="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  />
        <StackPanel VerticalAlignment="Center"   Grid.Column="1" Grid.Row="2" >
            <Button Content=" >>> " Margin="5" Name="BtSetCles" />
            <Button Content=" &lt;&lt;&lt; " Margin="5" Name="BtUnSetCles"/>

        </StackPanel>

    </Grid>
</UserControl>
